/*************************************************************************
 *************************************************************************
 	 	 	 	 	 	 	M2SMA : SDLTestAgent.h
 *************************************************************************
 *
 	 Copyright (C) 2011
 	 TODO, Steven Costiou, France
 *
 **************************************************************************
 **************************************************************************
 *
	FILE COMMENT
 *
 **************************************************************************
 **************************************************************************
 *
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/
 *
 **************************************************************************
 **************************************************************************/

#ifndef SDLTESTAGENT_H_
#define SDLTESTAGENT_H_

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "Agent.h"

#include <string>


class SDLTestAgent : public Agent
{

	public:

		SDLTestAgent(Engine* parentEngine);
		~SDLTestAgent();

	private:

		SDL_Surface* load_image(string filename);

		void apply_surface(int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip);

		bool init();
		bool load_files();
		void clean_up();

		void startAgent();

		void live();


	private:

	bool agentStarted;

	int SCREEN_WIDTH;
	int SCREEN_HEIGHT;
	int SCREEN_BPP;

	int SHEET_WIDTH;
	int SHEET_HEIGHT;


	SDL_Surface *faces;
	SDL_Surface *screen;

	SDL_Event event;

	SDL_Rect clip[4];
};



#endif /* SDLTESTAGENT_H_ */
